﻿#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdlib.h>

void MyStrcat(char* arr, char* s1)
{
	while (*arr)
		arr++;
	//while (*arr++ = *s1++);
	while (*s1)
	{
		*arr = *s1;
		arr++;
		s1++;
	}
	*arr = '\0';
}

//main97：指针实现字符串追加字符串strcat函数
int main97()
{
	char arr[100] = "hello";
	char* s1 = "world";
	MyStrcat(arr, s1);
	printf("1.输出自定义函数MyStrcat处理字符串arr后追加字符串s1后的值：%s\n", arr); //helloworld

	system("pause");
	return EXIT_SUCCESS;
}